fix rule replacement when value is not found

Signed-off-by: Blessing Osakue <iyoworks@gmail.com>