Trying to resolve a weird problem with undefined strings