handle deposit (fixes #2)