bug fix in database disconnection
fixed define syntax