fixed relation and UI bugs