fix redeploying failing the secondary objective

code cleanup