fixup some malformed function calls