Rules of Programming: Fix Bugs Before You Write New Code
If you want the highest possible code quality, code that's easy to maintain and code that actually does what you expect it to do - then you should fix bugs before you do anything else.
Bug fixing might be boring, yet you will thank yourself for taking your time fixing bugs, before writing new code. Why? Because if you write new code, you'll probably have even more bugs in it, and the new code might depend on existing code with bugs, thus making it quite problematic getting your code to work.
Rule #7 of programming:
Fix bugs before you write new code.