legend bug

hi - the following works ok...

   sp = matlib.subplot(111)
   mlfit = sp.plot(mljd, mlflux, 'r-')
   snfit = sp.plot(mljd, mlflux, 'g-')
   ctio = sp.errorbar(jd, f, yerr=df, fmt='bo', ecolor='k', capsize=1)
   sp.legend( ('ML fit', 'SN fit', 'CTIO'), loc='upper right')

however the legend is incorrect/incomplete if i change the order the
plots are done

   sp = matlib.subplot(111)
   ctio = sp.errorbar(jd, f, yerr=df, fmt='bo', ecolor='k', capsize=1)
   mlfit = sp.plot(mljd, mlflux, 'r-')
   snfit = sp.plot(mljd, mlflux, 'g-')
   sp.legend( ('ML fit', 'SN fit', 'CTIO'), loc='upper right')

thanks,
andy