Fixed error caused by 'not'