Fixed assignment of negative amounts. #56 in bitbucket.

Redoing a previous commit that was reverted when I removed the t4 stuff.