fix more syntax in functions