[MH,RG] Fix the problem to switch the layout at the beginning