Fixed broken parsing when receiving invalid data