Fixing validate_structure