Index: trunk/Ohana/src/kapa2/src/InterpretKeys.c
===================================================================
--- trunk/Ohana/src/kapa2/src/InterpretKeys.c	(revision 37362)
+++ trunk/Ohana/src/kapa2/src/InterpretKeys.c	(revision 37412)
@@ -50,10 +50,11 @@
     Z = -1;
 
-    if (graph) {
+    int haveGraph = graph && graph->haveGraph;
+    if (haveGraph) {
       X = (event[0].x - graph[0].axis[0].fx)*(graph[0].axis[0].max - graph[0].axis[0].min)/graph[0].axis[0].dfx + graph[0].axis[0].min;
       Y = (event[0].y - graph[0].axis[1].fy)*(graph[0].axis[1].max - graph[0].axis[1].min)/graph[0].axis[1].dfy + graph[0].axis[1].min;
       XY_to_RD (&R, &D, X, Y, &graph[0].data.coords);
     } 
-    if (image && !graph) {
+    if (image && !haveGraph) {
       if (event[0].x < image[0].picture.x) goto skip_cursor;
       if (event[0].y < image[0].picture.y) goto skip_cursor;
Index: trunk/Ohana/src/libdvo/src/coordops.c
===================================================================
--- trunk/Ohana/src/libdvo/src/coordops.c	(revision 37362)
+++ trunk/Ohana/src/libdvo/src/coordops.c	(revision 37412)
@@ -595,8 +595,23 @@
 
   if (status) {
-    if (!gfits_scan (header, "EQUINOX", "%lf", 1, &equinox)) {
-      if (!gfits_scan (header, "EPOCH", "%lf", 1, &equinox)) {
-	equinox = 2000.0;
+    char equinoxString[80];
+    int haveEquinox = gfits_scan (header, "EQUINOX", "%s", 1, equinoxString);
+    if (haveEquinox) {
+      // is the string a valid number (it is bad to interpret an error message as year 0.0)
+      char *endptr;
+      equinox = strtod (equinoxString, &endptr);
+      if (endptr == equinoxString) haveEquinox = FALSE;
+    }
+    if (!haveEquinox) {
+      haveEquinox = gfits_scan (header, "EPOCH", "%s", 1, equinoxString);
+      if (haveEquinox) {
+	// is the string a valid number (it is bad to interpret an error message as year 0.0)
+	char *endptr;
+	equinox = strtod (equinoxString, &endptr);
+	if (endptr == equinoxString) haveEquinox = FALSE;
       }
+    }
+    if (!haveEquinox) {
+      equinox = 2000.0;
     }
     if (fabs (equinox - 2000.0) > 0.1) {
