Probably not what you want to hear however your top rail is too short. It needs to extend beyond the upper post by enough to cut a matching angle on both rails. You could possibly move the rail out enough to cut the correct angle and dowel and glue a filler piece in where it meets the house that would be less noticeable.