Fix issue with run_task and invalid or undefined methods