Fix greedy tag matching