Rework rebuilding deps