fixed a bug which was coming because of auto-completion of tags