small changes(Fix Entity crash next commit)