Fixed no-reference warnings