Fixed insertIntoDatabase()