fixed database creation
creating right message, but not writing it in insert. strange.