Fix filepermissions loop.