fixed define syntax
bug fix in database disconnection