fixing some white-space bugs when parsing