fixed a bug introduced with the last commit