Changed the working of the pop merger code.