fixed a bug where specific keys were not deleted