The variable direction should be declared as volatile since it is updated in an ISR.
There may be other problems.
Edit. Why is the trigger "FALLING" ? are the switches push to break ? Anyway, since your code appears to be protected against switch bounce by an interlock, you could try "CHANGE" instead.