Fixed to return exit status