Make fixes suggested by @mwcraig