fix a bug introduced by prev commit