Index: /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelCol.java
===================================================================
--- /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelCol.java	(revision 27222)
+++ /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelCol.java	(revision 27223)
@@ -159,6 +159,8 @@
 				stackCol.remove(idx);
 			}
-			if ((stackIdx >= stackCol.size()) && (stackIdx != 0))
+			if ((stackIdx >= stackCol.size()) && (stackIdx > 0))
 				stackIdx = stackCol.size() - 1;
+			if (stackIdx < 0)
+				stackIdx = 0;
 			if (stackCol.size() == 0) {
 				stack.repaint();
Index: /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSectors.java
===================================================================
--- /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSectors.java	(revision 27222)
+++ /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/panels/PanelSectors.java	(revision 27223)
@@ -279,5 +279,9 @@
 		dlg.panelMain.mark.addLight(idx);
 		table.setSize(860, ((table.getRowCount() * 16) + 18));
-		syncPanel();
+		if (table.getRowCount() > 3) {
+			setSize(900, ((table.getRowCount() * 16) + 40));
+		} else {
+			setSize(900, 100);
+		}
 	}
 
@@ -286,9 +290,15 @@
 			dlg.panelMain.mark.delLight(idx);
 			table.setSize(860, ((table.getRowCount() * 16) + 20));
-			syncPanel();
+			if (table.getRowCount() > 3) {
+				setSize(900, ((table.getRowCount() * 16) + 40));
+			} else {
+				setSize(900, 100);
+			}
 		}
 	}
 	
 	public void syncPanel() {
+		table.updateUI();
+		table.setSize(860, ((table.getRowCount() * 16) + 18));
 		if (table.getRowCount() > 3) {
 			setSize(900, ((table.getRowCount() * 16) + 40));
Index: /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java
===================================================================
--- /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java	(revision 27222)
+++ /applications/editors/josm/plugins/smed/plugs/oseam/src/oseam/seamarks/SeaMark.java	(revision 27223)
@@ -422,5 +422,5 @@
 
 	public void setObjColour(int i, Col col) {
-		if (bodyColour.size() > i)
+		if (i < bodyColour.size())
 			bodyColour.set(i, col);
 		repaint();
