What is the error you are getting on the insert page? Those lines should clear the session. Probably one or the other would work, but it shouldn't cause issues to use both. I think the issue is correcting the error on the insert page, so if you provide that I may be able to help.