Fix: Undefined variable: str.