Fix incorrect [notmiddle] behavior