fix javascript for tags