Make sure pop returns value of element popped