fix bug in loop with UserOffset