Session fix

closes #511