fix nan handling in morphoop