small infinite loop bug fixed