Merge pull request #7 from egeste/master

Fixes a bug that causes dispose to be triggered multiple times