Fixed schdule type off by one error