Fix formula check