allowance calculator fix bug with '