Updated to handle the Maze Random, issues may arise in other applications!