Fixed bug in rendering tags