diff -Naur EMBOSS-3.0.0/ajax/Makefile.in EMBOSS-3.0.0-patched/ajax/Makefile.in
--- EMBOSS-3.0.0/ajax/Makefile.in	2005-07-15 06:59:14.000000000 -0400
+++ EMBOSS-3.0.0-patched/ajax/Makefile.in	2006-02-02 20:40:23.000000000 -0500
@@ -86,7 +86,8 @@
 libajax_la_OBJECTS = $(am_libajax_la_OBJECTS)
 @ISCYGWIN_FALSE@am_libajax_la_rpath = -rpath $(libdir)
 @ISCYGWIN_TRUE@am_libajax_la_rpath = -rpath $(libdir)
-libajaxg_la_LIBADD =
+libajaxg_la_LIBADD = libajax.la ../plplot/libplplot.la
+libajaxg_la_DEPENDENCIES = libajax.la ../plplot/libplplot.la
 am__libajaxg_la_SOURCES_DIST = ajgraph.c ajhist.c
 @ISCYGWIN_FALSE@am_libajaxg_la_OBJECTS = $(am__objects_2)
 libajaxg_la_OBJECTS = $(am_libajaxg_la_OBJECTS)
diff -Naur EMBOSS-3.0.0/ajax/ajindex.c EMBOSS-3.0.0-patched/ajax/ajindex.c
--- EMBOSS-3.0.0/ajax/ajindex.c	2005-06-20 03:41:01.000000000 -0400
+++ EMBOSS-3.0.0-patched/ajax/ajindex.c	2005-08-04 22:50:00.000000000 -0400
@@ -35,10 +35,14 @@
 				    AjBool isread);
 static AjPBtpage  btreeFindINode(AjPBtcache cache, AjPBtpage page,
 				 const char *item);
+static AjPBtpage  btreeSecFindINode(AjPBtcache cache, AjPBtpage page,
+				    const char *item);
 
 
 static AjPBtpage  btreePageFromKey(AjPBtcache cache, unsigned char *buf,
 				   const char *item);
+static AjPBtpage  btreeSecPageFromKey(AjPBtcache cache, unsigned char *buf,
+				      const char *item);
 static ajint      btreeNumInBucket(AjPBtcache cache, ajlong pageno);
 static AjPBucket  btreeReadBucket(AjPBtcache cache, ajlong pageno);
 static void       btreeWriteBucket(AjPBtcache cache, const AjPBucket bucket,
@@ -55,6 +59,7 @@
 				 AjPStr const *keys, const ajlong *ptrs,
 				 ajint nkeys);
 static AjBool     btreeNodeIsFull(const AjPBtcache cache, AjPBtpage page);
+static AjBool     btreeNodeIsFullSec(const AjPBtcache cache, AjPBtpage page);
 static void       btreeInsertNonFull(AjPBtcache cache, AjPBtpage page,
 				     const AjPStr key, ajlong less,
 				     ajlong greater);
@@ -808,7 +813,7 @@
     root = btreeCacheLocate(cache,0L);
 
     if(!root)
-	ajFatal("Something has unlocked the PRI root cache page\n");
+	ajFatal("The PRI root cache page has been unlocked\n");
     
     if(!cache->level)
 	return root;
@@ -863,6 +868,48 @@
 
 
 
+/* @funcstatic btreeSecFindINode *************************************************
+**
+** Recursive search for insert node in a secondary tree
+**
+** @param [u] cache [AjPBtcache] cache
+** @param [u] page [AjPBtpage] page
+** @param [r] item [const char*] key to search for 
+**
+** @return [AjPBtpage] leaf node where item should be inserted
+** @@
+******************************************************************************/
+
+static AjPBtpage btreeSecFindINode(AjPBtcache cache, AjPBtpage page,
+				 const char *item)
+{
+    AjPBtpage ret = NULL;
+    AjPBtpage pg  = NULL;
+
+    unsigned char *buf = NULL;
+    ajint status       = 0;
+    ajint ival         = 0;
+
+    /* ajDebug("In btreeSecFindINode\n"); */
+    
+    ret = page;
+    buf = page->buf;
+    GBT_NODETYPE(buf,&ival);
+    if(ival != BT_LEAF)
+    {
+	status = ret->dirty;
+	ret->dirty = BT_LOCK;	/* Lock in case of lots of overflow pages */
+	pg = btreeSecPageFromKey(cache,buf,item);
+	ret->dirty = status;
+	ret = btreeSecFindINode(cache,pg,item);
+    }
+    
+    return ret;
+}
+
+
+
+
 /* @funcstatic btreePageFromKey *******************************************
 **
 ** Return next lower index page given a key
@@ -928,6 +975,71 @@
 
 
 
+/* @funcstatic btreeSecPageFromKey *******************************************
+**
+** Return next lower index page given a key in a secondary tree
+**
+** @param [u] cache [AjPBtcache] cache
+** @param [u] buf [unsigned char *] page buffer
+** @param [r] key [const char *] key to search for 
+**
+** @return [AjPBtpage] pointer to a page
+** @@
+******************************************************************************/
+
+static AjPBtpage btreeSecPageFromKey(AjPBtcache cache, unsigned char *buf,
+				     const char *key)
+{
+    unsigned char *rootbuf = NULL;
+    ajint nkeys = 0;
+    ajint order = 0;
+    ajint i;
+    
+    ajlong blockno = 0L;
+    AjPStr *karray = NULL;
+    ajlong *parray = NULL;
+    AjPBtpage page = NULL;
+    
+    /* ajDebug("In btreePageFromKey\n"); */
+    
+    rootbuf = buf;
+
+
+    GBT_NKEYS(rootbuf,&nkeys);
+    order = cache->sorder;
+
+    AJCNEW0(karray,order);
+    AJCNEW0(parray,order);
+    for(i=0;i<order;++i)
+	karray[i] = ajStrNew();
+
+    btreeGetKeys(cache,rootbuf,&karray,&parray);
+    i = 0;
+    while(i!=nkeys && strcmp(key,karray[i]->Ptr)>=0)
+	++i;
+    if(i==nkeys)
+    {
+	if(strcmp(key,karray[i-1]->Ptr)<0)
+	    blockno = parray[i-1];
+	else
+	    blockno = parray[i];
+    }
+    else
+	blockno = parray[i];
+
+    for(i=0;i<order;++i)
+	ajStrDel(&karray[i]);
+    AJFREE(karray);
+    AJFREE(parray);
+
+    page =  ajBtreeCacheRead(cache,blockno);
+
+    return page;
+}
+
+
+
+
 /* @func ajBtreeIdNew *********************************************
 **
 ** Constructor for index bucket ID informationn
@@ -1617,6 +1729,36 @@
 
 
 
+/* @funcstatic btreeNodeIsFullSec *****************************************
+**
+** Tests whether a secondary node is full of keys
+**
+** @param [r] cache [const AjPBtcache] cache
+** @param [u] page [AjPBtpage] original page
+**
+** @return [AjBool] true if full
+** @@
+******************************************************************************/
+
+static AjBool btreeNodeIsFullSec(const AjPBtcache cache, AjPBtpage page)
+{
+    unsigned char *buf = NULL;
+    ajint nkeys = 0;
+
+    /* ajDebug("In btreeNodeIsFull\n"); */
+
+    buf = page->buf;
+    GBT_NKEYS(buf,&nkeys);
+
+    if(nkeys == cache->sorder - 1)
+	return ajTrue;
+
+    return ajFalse;
+}
+
+
+
+
 /* @funcstatic btreeInsertNonFull *****************************************
 **
 ** Insert a key into a non-full node
@@ -6967,7 +7109,7 @@
 	pripage = btreeCacheLocate(cache,0L);
 	pripage->dirty = BT_LOCK;
 
-	ajDebug("Created secondary tree at block %d\n",(ajint)secrootpage);
+	/* ajDebug("Created 2ry tree at block %d\n",(ajint)secrootpage); */
     }
     else
     {
@@ -9070,7 +9212,7 @@
     if(!cache->slevel)
 	return root;
     
-    ret = btreeFindINode(cache,root,key);
+    ret = btreeSecFindINode(cache,root,key);
 
     return ret;
 }
@@ -9694,7 +9836,7 @@
     
     /* ajDebug("In btreeInsertKeySec\n"); */
 
-    if(!btreeNodeIsFull(cache,page))
+    if(!btreeNodeIsFullSec(cache,page))
     {
 	btreeInsertNonFullSec(cache,page,key,less,greater);
 	return;
@@ -10572,7 +10714,7 @@
 
     list = ajListNew();
 
-    order = cache->order;
+    order = cache->sorder;
 
     AJCNEW0(karray,order);
     AJCNEW0(parray,order);
diff -Naur EMBOSS-3.0.0/ajax/ajpdb.c EMBOSS-3.0.0-patched/ajax/ajpdb.c
--- EMBOSS-3.0.0/ajax/ajpdb.c	2005-07-12 12:29:41.000000000 -0400
+++ EMBOSS-3.0.0-patched/ajax/ajpdb.c	2005-08-19 16:49:00.000000000 -0400
@@ -1198,7 +1198,7 @@
     osstr = ajStrNew();
     xstr  = ajStrNew();
 
-    /* Start of main application loop */
+    /* Start of main loop */
     while(ajFileReadLine(inf,&line))
     {
 	if(ajStrPrefixC(line,"XX"))
@@ -1313,6 +1313,8 @@
 	    
 	    (ret)->Nchn = ncha;
 	    (ret)->Ngp  = ngrp;
+
+	    continue;
 	}
 	
 
@@ -1382,7 +1384,11 @@
 	    ajStrToken(&token,&handle,NULL);
 	    ajStrToInt(token,&mod);
 	    if((mode == 0) && (mod!=1))
-		break;
+	      {
+		/* break; */
+		/* Discard remaining AT lines */
+		while(ajFileReadLine(inf,&line) && ajStrPrefixC(line,"AT"));
+	      }
 
 	    /* Chain number */
 	    ajStrToken(&token,&handle,NULL);
@@ -1463,7 +1469,10 @@
 			    "jison@hgmp.mrc.ac.uk");
 	    }
 	    else
+	      {
 		ajListPushApp((ret)->Chains[chn-1]->Atoms,(void *)atom);
+	      }
+	    continue;
 	}
 	
 	/* Parse residue line */
@@ -1479,8 +1488,11 @@
 	    ajStrToken(&token,&handle,NULL);
 	    ajStrToInt(token,&mod);
 	    if((mode == 0) && (mod!=1))
-		break;
-
+	      {
+		/* break;*/
+		/* Discard remaining RE lines */
+		while(ajFileReadLine(inf,&line) && ajStrPrefixC(line,"RE"));
+	      }
 	    /* Chain number */
 	    ajStrToken(&token,&handle,NULL);
 	    ajStrToInt(token,&chn);
@@ -1585,6 +1597,8 @@
             ajStrToFloat(token,&residue->pol_rel);
 
 	    ajListPushApp((ret)->Chains[chn-1]->Residues,(void *)residue);  
+
+	    continue;
 	}
     }
     /* End of main application loop */
diff -Naur EMBOSS-3.0.0/jemboss/org/emboss/jemboss/server/JembossServer.java EMBOSS-3.0.0-patched/jemboss/org/emboss/jemboss/server/JembossServer.java
--- EMBOSS-3.0.0/jemboss/org/emboss/jemboss/server/JembossServer.java	2004-10-29 08:07:02.000000000 -0400
+++ EMBOSS-3.0.0-patched/jemboss/org/emboss/jemboss/server/JembossServer.java	2005-08-30 13:22:00.000000000 -0400
@@ -973,7 +973,10 @@
     {
       public boolean accept(File cwd, String name)
       {
-        return name.endsWith(".png");
+        if( name.endsWith(".png") ||
+            name.endsWith(".dat") )
+          return true;
+        return false;
       };
     });
 
diff -Naur EMBOSS-3.0.0/nucleus/Makefile.in EMBOSS-3.0.0-patched/nucleus/Makefile.in
--- EMBOSS-3.0.0/nucleus/Makefile.in	2005-07-15 06:59:21.000000000 -0400
+++ EMBOSS-3.0.0-patched/nucleus/Makefile.in	2006-02-02 20:40:30.000000000 -0500
@@ -60,7 +60,8 @@
 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
 libLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(lib_LTLIBRARIES)
-libnucleus_la_LIBADD =
+libnucleus_la_LIBADD = ../ajax/libajax.la
+libnucleus_la_DEPENDENCIES = ../ajax/libajax.la
 am__objects_1 = embaln.lo embcom.lo embcons.lo embdata.lo embdbi.lo \
 	embdmx.lo embdomain.lo embest.lo embexit.lo embgroup.lo \
 	embiep.lo embindex.lo embinit.lo embmat.lo embmisc.lo \
diff -Naur EMBOSS-3.0.0/plplot/Makefile.in EMBOSS-3.0.0-patched/plplot/Makefile.in
--- EMBOSS-3.0.0/plplot/Makefile.in	2005-07-15 06:59:21.000000000 -0400
+++ EMBOSS-3.0.0-patched/plplot/Makefile.in	2006-02-02 20:34:39.000000000 -0500
@@ -60,7 +60,7 @@
 am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(includedir)"
 libLTLIBRARIES_INSTALL = $(INSTALL)
 LTLIBRARIES = $(lib_LTLIBRARIES)
-libplplot_la_LIBADD =
+libplplot_la_LIBADD = $(XLIB) -lgd
 am__objects_1 = pdfutils.lo plargs.lo plbox.lo plcont.lo plcore.lo \
 	plctrl.lo plcvt.lo pldtik.lo plfill.lo plhist.lo plline.lo \
 	plmap.lo plot3d.lo plpage.lo plsdef.lo plshade.lo plsym.lo \
