fixed bug from previous revision