Fix typo: use argument instead of external variable