Fix the problem with the database not saving. Thanks StackOverflow!