Minor fixes due to strict warnings (variables not passed by reference)