Changed offsetX and offsetY to offset.x. and offset.y.