prevented NaNs from slipping through