Bug fix

Thanks to Francesco Scafuti