Fix entity issue