Fixed bug that would have prevented endBackgroundTask from calling.