Fix NaNs in Safari.