more fixes to gallery view