Fix wait_status