added logic to prevent dsidx to alter wrong loop and posts object