fixed the negative expended errors