Gem update and fix session problem