fixed scheduler iteration bug