codereview fixes for 00dfc6a9b507dac4e59814ef8b0ffdbb68855a5f