I actually regret spending a lot of time documenting the system and fixing critical bugs before leaving one of my jobs. The owner was a jerk and ended up screwing us over on final pay. If I hadn't been so professional, the system would have failed within a few weeks and he would have paid dearly for us to fix it.