Dependency bugfixes and improvements