codereview fixes for 375b7dbf2bf2d70704a55588e3d5767309e955ed