Panels: fix variable names in destroy and fix tests