there should be a round gasket that goes over the flange . and meets with the pipe . and as for your other problem .those are head bolts and that is your head . the not staying tight means that the stud is stripped and you need to replace it . hope this helps .