corrected bug on converting numpart to int