gallery filename extension bugfix;