bug fixes for structure