fixed a bug with cubic to