Added permission fix for sessions.