mps depends on endpoint, I wonder why gcc didn't warn about i being used uninitialized...