fix a couple extra problems, make tests pass