Sweep 1 Rail Broken at corner between two curves

Hi all, does any of you know why the corner is broken when i sweep a profile along the rail? What should I do? Thank you.