added NaN test for resize