Fixing issues with session manager