some fixes related to round_robin and multithreading