better key_starts_with option handeling