Add missing assert and fix some nits.

TBR=fdoray@chromium.org

BUG=

Review URL: https://codereview.appspot.com/14960048