Database connection fixed and working