BUG: cout was dereferencing NULL pointer
STYLE: fix formatting