Fix invalid geometries

This fixes a self-intersection error.