Fixed getting structure type
and structure validation