Fix deploy_client not keeping hold of application