fixed gallery manage tpl (patch by tress13)