Fix throwing exception in the Stapler on redeploy page

Fix throwing exception in the Stapler on redeploy page