Mathematical expression fix