Fixes start blocks and provides better XML parsing errors.