fix gallery and other things