Fixing exception raising
Draft of changes in session