fix check_structure