fix _xpos and _ypos which should be float not int