Bug fix in session switching.
Authored by: bruno.herbelin@gmail.com 2011-04-08
Parent: [r329]
Child: [r331]