Corrected and fixed Gasperotti's 20141015 bug