fix for bug https://issues.infn.it/jira/browse/WMS-85