small bug with error function names