codereview fixes for b722c0a76e2d809190ecb82aa074b8240036a253