fixed gallery error