Syntax error in previous fix for nan detection