fixed bugs about two entities