added checks to make sure that background fetch is enabled.