bug fixes
bug fixes for sql
updated database conf