fix more formulae bugs