database connection
bug fix