Fixes regarding scheduler