do some architecture fixing.