fix vic_view check before database exists