popups added
fix some bugs with button behavior