fixed the calls to the correct c# function