changed bug so that you cant change direction while moving