Fix to return subprocess's status code correctly.