Fix a crash caused by Session.js