Fixed not passed by reference warning