Fix nil pointer dereference
Fix formatting directives
Merge pull request #2 from peterbourgon/master

Nil pointer deference fix