Minor errors in the function return statement