Fix some mutable variable warnings.