Fix copying dependencies