Fix the calculation logic of layer controller's width & height.