serious mistake in pop() (forgot to set c->prev to NULL on pop)