Fixed the nonconnection to database problem