Two Gallery bug fixes