fixing bugs in tax calculation