Fixed bug with detecting player while moving