Fixing bug in photo preloading. #1005