ajax gallery fix