fix for #391 also init viewMode to minViewMode