fixing a bug introduced by #2754