Moved touchForeignPtr back to the loop (accidental commit).