Fixed dumb logic error