encode string representation of connection id into long
some bug fixes in choice routing