added checks to prevent crashes due to several consequent calls to startProcessing