Update dispatch_error method

Fixes #9