fixed a bug introduced with #302