Handle JSON errors slightly better