race and review fixes from review and race detection