Fixed some code with getting rid of tags