codereview fixes for dc03112b9abb9483a0ca309950adbf44600ab2f5