Fix bug with preloading next image