Fixed offset bug, and empty string search case