minor improvements in tag setting