Fixed some problems when the player interacts with the object