Fixed conversion bugs and improved tag injection