Fixing de Casteljau algorithm