fixes Jenkins issue about "Malicious code vulnerability - May expose internal representation by returning reference to mutable object"