Handling the error event by default. Fixes #18.