Bugfix: remove instead of pop in insert.