fixed bug with sharing entities