Added leader entity handling