Inverting check to fix error introduced in c984f3e24