Changed check logic