fix some missed references when calling C functions