Fixed set clear button state in manage_clear_button to use the parameter
instead of the fixed one.
Added stopbutton in check_task_status function