Fix calling functions with wrong number of arguments