Fix for spinner being hidden before all images are loaded.