fixed bug, found more bugs.  fml.