Added auto tag detection