Fix for logic error.