Correctly update existing key when calling set. Fixes #2