fixed an arithmatic error