Some fixes. DB handle freeup. Less error messages in log.