button type added to widget
some small bugs fixed