fixed a bug from last commit