Fix nil pointer dereference
Fix formatting directives