Bug fix

signed by Rondelli Diego <diego-ronde@hotmail.it>