Small improvements to native deploying code