general fixes during weird parsing