Fixing logic.