Added some optimization for deployment.