Fix issue 254 - Root undeploy failed
Fix issue 393; commits made by pgier to the EAP 6.0.1 branch