Fixed unicode error and improved tag filtering