Fix compile errors wrt duration