fixed a bug from the last commit