fix gallery widget sort