Fix bug in pop().