fixed the bug with multiple runs