Fix bug #3380. Initialize widget before callback handler for 'clicked'