Fixed removal of templates along with its parent package