Implemented support for lenient parsing in from_string