Fix Dispose in test