fixes #5
made the deployer more robust to failures