Assignment of loop position was bugged in resampling case