codereview fixes for 23ec229f437bdeeb5a16d978e43f31447d30016d