Fix redeploy command and add test