Updated panel click handler