bugfix for direction checks