Fixed issue with purge task.