Corrected isnan function call.