Fixed some bugs with UI items