fixed ranges in tag parsing, closes #5