fix new schedule code