Time calculation fix.