Corrected bug in time logging