Fix last commit

Pass values by reference to make sure they are actually updated.