Deferred adding and removing deposits

Fix #197