Update gallery.php

bugfix