Replaced the sanitization.  Found another error in the loop and fixed it.