bug: fixed docAdjust function