Set correct exit status