codereview fixes for 6d01960c1359273b77bb14b4f73305ff1450001d