fixed issue which caused sessions not to be started correctly