Bugfix: key needs to be removed from list not popped.