Improved the dispose test a bit.