fix minor compiler error for pass reference data into method