bugfixes on gallery
Merge branch 'master' of https://github.com/samjhill/6g1w

Conflicts:
	gallery.php