codereview fixes for 7f5437f3658c7baded4481d9e25e60ed105fe49e