fixed

fixed the logic error