bugfixes to writing out visc4 variables