Fix tag detection
Fix entity context