Fix the loop error method

casted to NSOBJECT