Corrections

fixed some database connection problems