cleanup rest responses