fix encode schedule