fixed bugs in the methods for toil spend/gain