RFR: Diffing error

Use shift instead of pop in certain cases