fix gallery misc issues