Fix some things after porting to sgmlparser