Fixed exit code.
Merge pull request #1297 from naturalatlas/fix/333

Fixed exit code