fix math error in due date processing