Better handling of dispose()
Merge branch 'fix-issue-1' into meez-dev