fixes code view switch