Bugfix: session variable was not updating properly