fixed gallery issues