fix reloading of class list widgets

• by declaring the related vars in prepare
• and fixing the context of this