Small parsing improvements.

Not been tested.