add error handling to controll view switch