database connection bug resolved