bug fix for button init