Fixed wrap func (and added test case)