fixed gallery click bug