Added conditional for semantic-mode