added not working error handler