fixed bug in popPanel()