Fixed bug when scanning for patient that does not exist locally