Fixes for issue #2787

See: https://issue.i-marine.research-infrastructures.eu/ticket/2787