I was browsing through some web services code I had written a few months prior and was now doing a bug fix for it when I noticed an if statement with a boolean condition that would be easier to read if it were the other way around. I modified the condition to improve readability but in doing so actually flipped the condition. Luckily QA caught it otherwise it would have broken customer sign up through the web portal for a number of clients. Not a great mistake to make but it taught me a great lesson - never ever ever refactor something without the proper tests in place first, it's not worth the risk.