Fixes to refresh highlighting. Small bug fixes.