fix for MaxDebit bug

max duration was calculated badly