Fixes a bug in the code handling units of time.