fix commit_to_database and create_database