Adjusted to new ui class passed api.