fixed seg fault and made accelleration for player better