Fixes as per code review #4235

Thanks, jfrey!