fix support for multi root and multi package