fixing code at moving sprite using mouse

sprite moves when mouse selecting and dragging the object