correcting the minutes calculation