Fixed a restructuring bug