fixed the issue with connecting to the database