fix bug when calling wrapped