Maze valid fix

fixed minor error from previous commit