scheduled task bug fix