various fixes from review