Fixed call to db->disconnect()