Fix bug in ContourGenerator.