Fix awkward logic error.