Fixed editor refreshing on unit change