Merge pull request #147 from mtemenos/master

Reverting change causes the entity to be resolved to the wrong type/object