That's not good. For bug fix, you'd better make minimal change. Mixture of bug fixing and refactoring is not good practice. You may introduce new bugs in refactoring - why do such thankless job?