small parsing fixes here and there