fix crash on request error