fix bug in interval(wait, x) when no x passed