2 small fixes (I think)

See commits. make test wouldn't produce anything useful without these two changes.