closes #63; other misc bug fixes