fixed issues with getConnectedEntities