fixed critical structual error