fix db creation, fix package directory