Fix database instanciation