fixed a small logic error