fixed gallery layout partially