fix code and a couple tests (broken with move to minitest)