fixed bug in session controller