more robustness in text parsing