Fixes an event handler leak.

Includes a test. Also includes async as a devDependency.