fixed the bug that occurs when c = 0
maintenances