Fix https://github.com/rec/grit/issues/1 and https://github.com/rec/grit/issues/12