Fix dispose regression in 0.9.0

Fix a few other subtle dispose cases as well.