Fixed stupid error when checking criteria