fixed a bug with the previous commit