fix player not reach end bug