Bug fixed in maze solving algorithm. Related to #2