fix post_deploy to run partly in background