Fix some layerControlFrm bugs