fixes a bug introduced in previous commit