Fixed key deletion problem