Seriously, you can't exspect an answer to your question without giving some more information about the purpose and operation of your code. You also may want to elaborate, what "becomes unstable" actually means.
As a - very general - answer: If the code synthesized correctly and no problems are indicated in timing analysis, I suspect rather a problem of inadequate algorithms than coding problems.
To disprove my (possibly destructive) assumption, you should be able to clarify, why and how the code is able to perform satisfyingly by design.