removed error when window gets resized initially