Fixes for the resizing of the gallery, also some visual problems