Fix compilation errors due to mutable references.

Authored by Luca Mattiello <aiedail92@gmail.com> on Mar 6 2011, 8:59 PM.