fix interval bug