Fix showing images in widgets
Code cleanup