Fix interval bug