As a side note, you can replace :
PHP Code:
if (task_exists(TASK_ROUND))
remove_task(TASK_ROUND)
if (task_exists(BUILD_TASK))
remove_task(BUILD_TASK)
with
PHP Code:
remove_task(TASK_ROUND)
remove_task(BUILD_TASK)
because remove_task checks if the task exists.
__________________