Fix treecap integration