ported to this repo the fix to https://issues.infn.it/jira/browse/WMS-97