Fix the loop error method

casted in NSOjbect