fixed invalid entities