entity cleanup
Merge pull request #2829 from kurund/entity-fixes

entity cleanup