Fix logic error.
COOK-2522