simij,aravind | fixed infinite loop