database.commmit() fix