kc: copy interval() fixes from kl