fixed viewstate issues