Fix bug in time*freq functions when integer wrap occurs