invalid entities bugs