fixes handling failed requests