fix the wrong check introduced in 1be015b0cc3d845bd5a96ba93a0b9b1638ec90e5