fixes for review comments
(cherry picked from commit 3e3b44b) [r=Peter.Gromov]