Fix type casting of string scopes to array in log engines