Added logic for when Entity changes