Fixed small bug in gallery ajaxpage