Fix bug with subpackages