fixed broken while loop when matching finishes