Wrong surface with sweep 2 rails

I tried to create a surface by using sweep 2 rails. I tried to do the same thing by using loft too but I had the same problem as you can see from the image.
I think it is something easy to fix but I tried different solutions but nothing happened.

Thanks a lot,

Flipping all the curves on the right side could be a solution. But nobody knows without a file: