bugfix from Faried