Fix performance problems with LNP and AIP