Fixed rare exception in ui