Fix broken database communicaiton