refactoring current undeployment logic in Autoscaler
fixing a NPE is ApplicationMonitor