fix valid() in fde format