more code review fixes
Merge pull request #627 from jay-hodgson/SWC-852

more code review fixes