fixed failing unit test
slightly improved logic for getting latest build