Error handler fix