Fix syntax errors in the set pointers for-loop