fixed nasty bug with view_mode implementation