fix gallery path in hooks