fixing database initialisation