fixed weird bugs in player.as