fix deprecated panel code