Macro Error

If you record a macro for creating sketch on TOP PLANE and extrude it. and when you run the macro, Sketch gets shifted from TOP plane to Front Plane. 

 

IS this a technical error? or is it something wrong in OPTIONS setting?