Matching treenet and bnetcpd. Fixed changelength init bug