Fix calculation of seconds