improve schedule handler
minor fix