optimize query and add status message for tagging
Merge branch 'master' into RELEASE_20130723