Fix curve removal bug