Bug fixes.  Closes #59 and closes #60