fixed a bug introduced by the previous commit