Fixed the Photo Gallery bug