scheduler and runtime fixes