Fixed the databases and encryption to work with them