fix errors, add subpackage dependencies