must set exit status correctly