Fixes to THEFunction.