Fix battery drain of background service