improve check code for judge if we can bypass validation