Fix dumb if logic error