fixed few tags-related bugs, few more test cases