Fixing a function name and warning messages during compilation