fixed database initalisation call