fixed issue with reverse directions