Fix errors in taxonomy functions