Solved a race condition where the failure of a deploy was not properly checked.