small bugfix -- need to use a more robust parser