Fix suggested by pgimeno here (https://github.com/pioneerspacesim/pioneer/issues/2239)