Fix #10: Corrected widget class init based on autoWidget setting