fix direction choosing