Fixed always exiting with status of 0 bug try 2