fix tests

fix synchronized sections and remove from hashmap old sessions