Fixed assignment of negative amounts. #56 in bitbucket.