Added session copying to handle mongo flux