Fix performance issues.