Fix for scheduler