fixed bug in which newly created databases were not using the password but rather using the contents of memory as the key