a fix for a bug introduced in the refactor