Fixed the bugs that layer 1 and layer 2 are overlapping.