Some bugs in lca algorithm