fixes for DB-related details + exception handlings