Some problems, probably in the pop() method