[0.4.6] fixes #12 , fixes ressource leak when importing old databases