# How to fix twisting in beveled curve?

I have a simple bezier curve made up basic angles. When i try to bevel it and give it some thickness, what should be a cylinder becomes twisted and warped. I have attached some pictures. How can I fix the twists and warps?