Fix semantic errors not showing error message.