Curve sometimes doesn't get drawn. Fixing this.