More tweaks to gallery navigation