fix maze bug