fixing scheduled task deletion