bug fix when finished run or analysis is not found

- fixed a bug that an exception is thrown when no finished run or analysis is found
trivial refactoring