improvements to cope with donations
Merge pull request #7 from yamatt/master

bug fix and now copes with donations