Fixed regression caused by last patch

Script would crash when getting any non 200 response