minor bug fixes in tag framework