fixes PR #20 when using randomly generated run ids (better patch by @slava-vishnyakov)