offset not good

I just started using Corona SDK. And learning how to make apps with it. For example i am using:

local myRectangle = display.newRect( 0, 0, 150, 50 )

myRectangle.strokeWidth = 3
myRectangle:setFillColor( 0.7 )
myRectangle:setStrokeColor( 1, 0, 0 )

When i use this it will look like this on my phone

rKHM7.png

When i am using this code:

local myRectangle = display.newRect( 77, 27, 150, 50 )
myRectangle.strokeWidth = 3
myRectangle:setFillColor( 0.7 )
myRectangle:setStrokeColor( 1, 0, 0 )

Then it will looks like this on my phone:

ef2hV.png

It looks like the offset is not good. Does anybody know how to fix this problem?

x y refer to center of objects not top left. you can change anchor points if you want top left

x y refer to center of objects not top left. you can change anchor points if you want top left