Add custom and failsafe options into sessions.
Add some extra checks to validate session index.

Could cause some crashes in the futures due to bugs in themes.