misc. small fixes

For details, see https://chromiumcodereview.appspot.com/453093005/.