Pro tip: When you find an issue, first write a test case that replicates the issue, and only afterward start fixing it.
Not only does the test prove whether the fix is working, but it will also help you avoid a regression on the same issue in the future.