fixed error in determinating pastDue status