Added SQL checks to tag and controller sites