Fix clearing on drop, and fix faulty tests that hid the problem