fixing viewchange