Correction of functions with invalid arguments