Gallery upgrade, small fixes