Fixed refresh issues during view switch.