Fixing trend logic.