Change reference from @task to Task.find(@task)