fix some issues when highlighting code