Fix warning "Only variable references should be returned by reference"