correct widget builde logic