Update dispatch_error method

Fixes #8