Modified logic for picking scans from locker/

Taking care of backward compatibility