Fixed using function pointers as an argument when spawning tasks.