cleanup for client and schedule