Ugly patch to get roles when session is closed