Always fire OnClose even if Close throws an error.
- Added unit test
#1554
Merge branch 'release' into dev