fix entity issue