fix exitstatus code