Fixed add 2 panels on the same side

I've found a problem when you add 2 panels during initialization. Both panels will be visible next to each other instead of 2 tabs in 1 panel. It is because the name is not set during initialization. This pull request fixes that.