various fixes as requested by pr reviewers