Refactor #3370: Rechange the check logic