Updated the thd_current function to use the actual function (get info
from stack).