logging fix for invalid response