The majority of time debugging is not spent removing bugs but understanding code behavior. Once you understand why undesirable behavior is happening it is usually relatively easy to fix this behavior.