Fixed things to work with new gallery