Cleaning code to fix the bug with the tags