fixed gallery grid issues