Fixed null point exception in Scheduled Scan