WrapAction() won't assign a sub template if funtion is set

Signed-off-by: John Rayes <live627@gmail.com>
Merge pull request #1247 from live627/ca

WrapAction() won't assign a sub template if funtion is set