Fixed an issue where tag was undefined in iOS