Improvments for VERY short windows (deal with length=1).