Fixed a stupid logic error.