Fixed a bug in opening structures.