I have the exact same issue with my projects, but recently I read something which seems to have helped over the last few weeks;
"Never got to bed satisfied."
It means, don't stay up all night fixing that issue, leave it till the next day when you will really want to start fixing the issue.
It seems to be a great way to maintain focus and motivation.