Time related fixes