Fix the geometry handling.