Flanges in sheet metal

Im trying to model a belt guard and cannot seem to create either a miter or edge flange off a particular edge i need.  I can do any edge but the one i need and the one time i did get an edge flange to work it gave me errors when trying to flatten the part. Attached are some basic pictures of what im trying to do.  Ive spent a good 8 hours on a part that should take 20 minutes.

SolidworksSheet Metal