Hi Muhammad,
Are you sure that the correct controller is invoked when widget is added ? You can check this by debugging .
When a widget is added the widget identifier is mapped to widget based on the class mentioned in the registered attribute. Please make sure it is correct one.
Thanks,
Prasanth M