fixed an issue in scheduler