Fix error function argument issue