Fixed argument by reference
Fixed temporary variable assignment