Fixed multiple-run bugs