fix scheduler creation