commit from Ionut Sas