fix for bug https://issues.infn.it/jira/browse/CREAM-121
fix for bug https://issues.infn.it/jira/browse/CREAM-122