undeployAll not async and unnecessary undeployments fixed

Signed-off-by: Julien <jlehuraux@chyro.fr>