Replace ref with out in the stake modifier calculation method.