Added some debugging code, since I've found a very *wierd* bug!
Minor thoughts.