Fixed bug with deleting panels and creating new ones.