Fix performance regression