gallery bugs fixed