Various fixes

For [this](https://www.google-melange.com/gci/task/view/google/gci2014/6410538632347648) GCI task.