Fix closing order