Fix remove taxon js code

[Fixes #3136][Fixes #3140]