Possibly fixes sonar InvalidArgumentException