fix direction calculations