Bugfix for multiple galleries on one page