bugfix from Alekh