bug fix adding existing keys