fix the abstract widget constructor