fix parentheses to keep code unchanged when lookback=1