fixed gallery ratio problems