fix view state memory