Fixed Gallery bugs