Fix of creating elements right after adding panel.