fix gallery thumbnail reference