fixed some issues in parsing -- account for space sometimes being absent