fixed bug from code merge