fixed database and insert new message