bugfix for buildWrap

bugfix for buildWrap