fixed missing argument in error handling