fix build script not putting deps first