removed i=i statements to avoid compiler warning
updates for portability to 'make uninstall'