fixed removeLeaf front end