fix widget template for invalid widget configuration