debt calculation and reporting fixes