Bug fix in SEDCube.valid