fixing transition from browse -> detail mode, and back again