-Fixed bug with event handlers being disconnected when adding a new item to the layout.