Entity state property correctly set. Minor fixes