Fix some problems updating existing keys