Fix dumb logic error