changes to sessionhandler for bugfix