fix bug in capture template