fixes for problems detected during PR review