Fixed: refresh variable not being reset. Added: refreshing gallery page refreshes the photos inside them as well.