Fixed a gallery bug