Fixed issue with calling UI code from init() method