pop works properly