Fixed an issue with page resizing and the gallery layout.