Flag system is working well on detail_guest.html, was running into problem but fixed by making the page not load with ajax, cannot have two of the same ids in dom at once, this happens when you redirect to the same page.