Fix #18 and things broken in previous commit.