Fixed prereq removal infinite loop bug