Fixing the "pass by reference" bug reported by Mohsen.