make valid() stronger in pst format