Bug fix: popn/shiftn were the wrong way around!