time fix and cleanup

Change-Id: I6474e622d8c85034c72ec1e435e94c5acdb008dc