Fixed bug in gallery