Post code review fixes (review @nbeloglazov).