Bugfix: error accessing session varaible