fixed gallery issue