added resize to form on deletion, added check if root doesnt exist