added extra check for 'buffer search range'