Fixed typo in error eventhandler