Exit code fix closes #9