fix for h == nan in cpeditor