Fixed widget generation in frontend