Fix issue where incorrect grid type gets exported to XML

This is caused by the difference in naming intersections.
Fix invalid starting and ending points