fixed error in set_position