infinite loop bug fix #73