Fix issue with multiple JSON errors