build-dep and fix some stuff