Make sure exit status is correct