Inconsistent code coloring in preview and edit mode