This code is a pain in the ass and I kind of feel bad for posting it, to be honest, but it's usually because it's affected by something in another part of the code.
I'm going to go poke at your code and then I'll get back to let you know what I think it is. Usually, you can just widen the tables by the percentage and that usually helps. But it depends on the actual problem.