FIXED BUGS FOR DIRECTION