Fixed issue which caused unwanted side effects on keyChain which was provided externally