Changed update_queues logic and adjusted do_schedule behavior on empty run queue