fixed bugg with direction changes all the time