fixed bug from previous commits